package com.example.javabasic.thread.classtwo.activeobject.demo1;

public class TestMakeString extends Thread {
    private final ActiveObjects activeObjects;
    private final char fillChar;

    public TestMakeString(ActiveObjects activeObjects, String name) {
        this.activeObjects = activeObjects;
        this.fillChar = name.charAt(0);
    }

    @Override
    public void run() {
        for (int i = 0;i<1 ; i++) {
            Result result = activeObjects.makeString(i + 1, fillChar);
            try {
                Thread.sleep(1000);
                Object resultValue = result.getResultValue();
                System.out.println("Thread.getCurrentThread=>"+Thread.currentThread().getName()+"=>"+resultValue.toString());

            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
